@(qcmForm: Form[Qcm], qcm: Qcm, allThemes: List[Theme] )
@import helper._


@main("Creation QCM step 2/3 : Associer les questions aux QCM"){
	@helper.form(action = routes.CreateQCM.submit(2)){

		<fieldset>
		<legend>Initialisation :</legend>
		<div>
					<h6>Libell&eacute : </h6> @qcmForm("libelle").value
					<h6>Date Ouverture :</h6> @qcm.getDateOuverture().format("dd/MM/yyyy HH:mm")
					<h6>Date Cloture : </h6> @qcm.getDateCloture().format("dd/MM/yyyy HH:mm")
					<p></p>
				</div>
		
			<legend>Association Question-QCM</legend>				
					<label>Theme : </label>
					<select id ="theme" name="theme">
						@for(theme <- allThemes){
    					<option  value=@theme.getIdTheme()>@theme.getLibelleT()</option>
    				}
    				</select>
    				
					<div align="center">
					<label>Matiere : </label>
					<INPUT type="text" name="matiere">
					</div>
					
					<div align="center">
					<label>Chapitre : </label>
					<INPUT type="text" name="chapitre">
					</div>
					
					<div align="center">
					<label>Questions : </label>
					<INPUT type="text" name="listeQuestions">
					</div>
		</fieldset>
		
		<input type="hidden" name="libelle" value="@qcmForm("libelle").valueOr("")">
	    <input type="hidden" name="dateOuverture" value="@qcm.getDateOuverture().format("dd/MM/yyyy HH:mm")">
	    <input type="hidden" name="dateCloture" value="@qcm.getDateCloture().format("dd/MM/yyyy HH:mm")">
        <div class="actions">
        	<button type="submit" name="action" value="retour" class="btn btn-primary">
				Retour <i class="icon-white icon-circle-arrow-left"></i> 
			</button>
        	<button type="submit" name="action" value="valider"class="btn btn-primary">
				Valider <i class="icon-white icon-circle-arrow-right"></i>
			</button>
        </div>
        }
 }